#include <iostream>
#include <cstring>
using namespace std;

class Point
{
public:
    int x;
    int y;
    int z{3}; // 默认成员初始化
    // 成员初始化列表
    Point(int x, int y) : x{x}, y{y}
    {
    }
};
int main()
{
    Point p1{1, 2};
    cout << p1.x << endl;
    cout << p1.y << endl;
    cout << p1.z << endl;
}
